package com.example.database.demo.constants;

import com.example.database.demo.enums.ExpressServiceCodeEnum;
import com.example.database.demo.service.IServiceCodeStandard;

import java.util.HashMap;

/**
 * @author xionglin
 */
public class SFContestant {
    public static String partnerID = "partnerID";
    public static String requestID = "requestID";
    // 接口服务码
    public static String serviceCode = "serviceCode";
    public static String timestamp = "timestamp";
    public static String msgData = "msgData";
    public static String msgDigest = "msgDigest";
    public static String accessToken = "accessToken";
    public static String logisticID = "logisticID";
    public static String nonce = "nonce";
    public static String logisticIDCode = "SF";
    public static String headers = "X-Auth-token";
    public static String expressFileNameSuffix = ".pdf";
    public static String invalidApiResultCode = "A1006";
    public static String successApiResultCode = "A1000";

    public static IServiceCodeStandard getIServiceCodeStandard(String value) {
        HashMap<String, IServiceCodeStandard> serviceCode = new HashMap<>();
        serviceCode.put("EXP_RECE_CREATE_ORDER", ExpressServiceCodeEnum.EXP_RECE_CREATE_ORDER);//下订单
        serviceCode.put("EXP_RECE_SEARCH_ORDER_RESP", ExpressServiceCodeEnum.EXP_RECE_SEARCH_ORDER_RESP);//订单查询
        serviceCode.put("EXP_RECE_FILTER_ORDER_BSP", ExpressServiceCodeEnum.EXP_RECE_FILTER_ORDER_BSP);//订单取消
        serviceCode.put("EXP_RECE_SEARCH_ROUTES", ExpressServiceCodeEnum.EXP_RECE_SEARCH_ROUTES);//查路由
        serviceCode.put("EXP_RECE_GET_SUB_MAILNO", ExpressServiceCodeEnum.EXP_RECE_GET_SUB_MAILNO);//子单号
        serviceCode.put("EXP_RECE_QUERY_SFWAYBILL", ExpressServiceCodeEnum.EXP_RECE_QUERY_SFWAYBILL);//查运费
        serviceCode.put("EXP_RECE_REGISTER_ROUTE", ExpressServiceCodeEnum.EXP_RECE_REGISTER_ROUTE);//注册路由
        serviceCode.put("EXP_RECE_CREATE_REVERSE_ORDER", ExpressServiceCodeEnum.EXP_RECE_CREATE_REVERSE_ORDER);//退货下单
        serviceCode.put("EXP_RECE_CANCEL_REVERSE_ORDER", ExpressServiceCodeEnum.EXP_RECE_CANCEL_REVERSE_ORDER);//退货消单
        serviceCode.put("EXP_RECE_WANTED_INTERCEPT", ExpressServiceCodeEnum.EXP_RECE_WANTED_INTERCEPT);//截单转寄
        serviceCode.put("EXP_RECE_QUERY_DELIVERTM", ExpressServiceCodeEnum.EXP_RECE_QUERY_DELIVERTM);//时效标准及价格查询
        serviceCode.put("COM_RECE_CLOUD_PRINT_WAYBILLS", ExpressServiceCodeEnum.COM_RECE_CLOUD_PRINT_WAYBILLS);//面单打印
        serviceCode.put("EXP_RECE_UPLOAD_ROUTE", ExpressServiceCodeEnum.EXP_RECE_UPLOAD_ROUTE);//路由上传
        serviceCode.put("EXP_RECE_SEARCH_PROMITM", ExpressServiceCodeEnum.EXP_RECE_SEARCH_PROMITM);//预计派送时间查询
        serviceCode.put("EXP_EXCE_CHECK_PICKUP_TIME", ExpressServiceCodeEnum.EXP_EXCE_CHECK_PICKUP_TIME);//揽件服务时间查询
        serviceCode.put("EXP_RECE_VALIDATE_WAYBILLNO", ExpressServiceCodeEnum.EXP_RECE_VALIDATE_WAYBILLNO);//运单号合法性校
        return serviceCode.get(value);
    }
}
